package com.vita.bduck.logger;

import java.io.Serializable;

/**
 * 日志model
 * Created with IntelliJ IDEA.
 * User: Vita Hao
 * Date: 13-6-19
 * Time: 上午10:10
 * To change this template use File | Settings | File Templates.
 */
public class LogInfo implements Serializable {
    private static final long serialVersionUID = 1L;
    public static final int TYPE_LOG = 0;
    public static final int TYPE_OPERATION_LOG = 1;

    private int type; 				// 日志类型，TYPE_LOG=0普通日志、TYPE_OPERATION_LOG=1操作日志
    private String level; 			// 日志等级
    private String time; 			// 日志时间
    private String tid; 			// 发生的线程ID
    private String tag; 			// TAG
    private String text; 			// 具体信息
    private String functionCode; 	// 用于标识操作日志
    private String remark; 			// 用于备注操作日志

    public LogInfo() {
        super();
    }

    /**
     * 操作日志构建函数
     * @param time
     * @param functionCode
     * @param remark
     */
    public LogInfo(int type, String time, String functionCode, String remark) {
        super();
        this.type = type;
        this.time = time;
        this.functionCode = functionCode;
        this.remark = remark;
    }

    /**
     * 日志构建函数
     * @param type
     * @param level
     * @param time
     * @param tid
     * @param tag
     * @param text
     */
    public LogInfo(int type, String level, String time, String tid, String tag,
                   String text) {
        super();
        this.type = type;
        this.level = level;
        this.time = time;
        this.tid = tid;
        this.tag = tag;
        this.text = text;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getFunctionCode() {
        return functionCode;
    }

    public void setFunctionCode(String functionCode) {
        this.functionCode = functionCode;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "LogInfo [type=" + type + ", level=" + level + ", time=" + time
                + ", tid=" + tid + ", tag=" + tag + ", text=" + text
                + ", functionCode=" + functionCode + ", remark=" + remark + "]";
    }

}
